package com.example.demospringboot.batch;

import org.springframework.batch.core.ExitStatus;
import org.springframework.batch.core.StepExecution;
import org.springframework.batch.core.StepExecutionListener;

/**
 * @author chenlei
 * @date 2019-11-25
**/
public class MyStepExecutionListener implements StepExecutionListener{

	/* 
	 * @author chenlei
	 * @date 2019-11-25
	 * @description 
	 * @see org.springframework.batch.core.StepExecutionListener#beforeStep(org.springframework.batch.core.StepExecution)
	 */
	@Override
	public void beforeStep(StepExecution stepExecution) {
		System.out.println("步骤执行之前的操作");
	}

	/* 
	 * @author chenlei
	 * @date 2019-11-25
	 * @description 
	 * @see org.springframework.batch.core.StepExecutionListener#afterStep(org.springframework.batch.core.StepExecution)
	 */
	@Override
	public ExitStatus afterStep(StepExecution stepExecution) {
		System.out.println("步骤执行之后的操作");
		return ExitStatus.COMPLETED;
	}

}
